<template>
	<div class="bedsList">
		<div class="bedsListitem-box" v-for="beditem,key in bedsList" :key="key" @click="gobedid(beditem.bedsId,beditem.bedsNo)">
			<div class="bedsList-item">{{beditem.bedsNo}}床</div>
			<div class="bedsList-item bedsList-itemred">{{beditem.bedsPrices}}元/晚</div>
			<div class="bedsList-item">查看图片</div>
		</div>
	</div>
</template>

<script>
	
	import { mapGetters, mapActions } from 'vuex'
	export default{
		name:"bedsList",
		data(){
			return{
				
			}
		},
			computed: {
			...mapGetters([
				'source',
				'bedsList',
			])
		},
		mounted(){
		},
		methods:{
			...mapActions({
				setbedsId:"setbedsId",
				setbedsNo:"setbedsNo"
			}),
			gobedid(bedsId,bedsNo){
				this.setbedsId(bedsId);
				this.setbedsNo(bedsNo);
				this.$router.go(-1)
			}
		}
	}
</script>

<style scoped>
	.bedsListitem-box{
		display: flex;
		justify-content: space-between;
		padding: .24rem;
		box-sizing: border-box;
		font-size: .31rem;
		color: #282828;
	}
	.bedsList-itemred{
		color: #E25051;
	}
</style>